<template>
  <div class="header">
    <div class="imgcontainer">
      <img class="close" src="../../assets/footer/closed.png" @click='close'>
      <img class="logo" src="../../assets/footer/login_logo.png">
    </div>
    <router-view></router-view>
    <div class="tab">
      <div class="tab-item tab1">
        <router-link to="/login/login">登录</router-link>
      </div>
      <div class="tab-item tab2">
        <router-link to="/login/regist">注册</router-link>
      </div>
    </div>
  </div>
  </div>
</template>

<script>
export default {
  name: 'login',
  data () {
    return {
      msg: 'Welcome to 22',
      id: ''
    }
  },
  created: function () {
    
  },
  methods: {
    close: function(){
      this.$router.push({path:'/index/all'})
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .header{
    padding-bottom: 51px;
    overflow: hidden;
    background-color: #ffffff;
  }
  .imgcontainer{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:space-between;
    padding:30px 0 10px;
    box-sizing:border-box;
    position:relative;
  }
  .close{
    position:absolute;
    right:20px;
    top:20px;
    height:24px;
    width: 24px;
  }
  .logo{
    width: 240px;
    display: block;
  }
  .tab{
    border-top:1px solid #e0e0e0;
    background-color:#fff;
    overflow:hidden;
    position:fixed;
    bottom:0;
    width: 100%;
    max-width: 720px;
    z-index:1000;
  }
  .tab-item{
    overflow:hidden;
    float:left;
    width:50%;
    text-align:center;
    font-size:12px;
    color:#555;
  }
  .tab-item a{
    display: block;
    color: #808080;
    padding: 4px 0;
    font-size: 1rem;
  }
  .tab-item a:before{
    content: '';
    display: block;
    margin: 0 auto;
    width: 24px;
    height: 24px;
    background-size: 24px 24px;
  }
 .tab .tab-item a.active{
    color: #e03e3f;
  }
  .tab1 a:before{
    background: url('../../assets/footer/tab_me_normal.png') no-repeat;
    background-size: 24px 24px;
  }
  .tab1 a.active:before{
    background: url('../../assets/footer/tab_me_select.png') no-repeat;
    background-size: 24px 24px;
  }
  .tab2 a:before{
    background: url('../../assets/footer/regist_normal.png') no-repeat;
    background-size: 24px 24px;
  }
  .tab2 a.active:before{
    background: url('../../assets/footer/regist_select.png') no-repeat;
    background-size: 24px 24px;
  }
</style>
